<?php
/**
 * 微信模块
 */

namespace app\mobile\controller;

use dc\controller\HomeBaseController;
use dragon\Support\Wechat;

class WechatController extends HomeBaseController
{

    // 接收微信通知
    public function index()
    {
        Wechat::receive();
        exit();
    }

    // 获取管理员绑定二维码
    public function bindAdminUserQrcode()
    {
        // 允许跨域请求
        header("Access-Control-Allow-Origin: *");
        $id = (int)$_GET['id'];
        $task = Wechat::getSence('\\Dragon\\User\\User', 'bindTask', $id);
        $this->result($task, 1, 'success', 'json');
    }

}
